import java.util.stream.Stream;

/**
 * Created by Germmy on 2018/4/2.
 */
public class TestCollect {
    public static void main(String[] args) {

        StringBuilder s = Stream.of("aaa", "bbb", "hello", "world", "this is a doc")
                .parallel()
                .collect(StringBuilder::new,
                        (x, y) -> x.append(y).append(" "),
                        StringBuilder::append
                );

    }
}
